import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/colors.dart';
import 'package:moose_app/ui/values/constants.dart';
import 'package:moose_app/ui/widgets/common/common_list_item.dart';

class ATHSettingScreen extends StatelessWidget {
  static final String routeName = "app://mimeSetting";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(centerTitle: false, title: Text("设置")),
      body: SafeArea(
        child: SingleChildScrollView(
          child: Column(
            children: <Widget>[
              ATHCommonListItem(
                title: Text("账号与安全",
                    style: TextStyle(color: kColor33, fontSize: kFontSize32)),
                showDivider: false,
              ),
              Container(
                margin: EdgeInsets.only(top: kSize20),
                child: Column(
                  children: <Widget>[
                    ATHCommonListItem(
                      title: Text("新消息通知",
                          style: TextStyle(
                              color: kColor33, fontSize: kFontSize32)),
                    ),
                    ATHCommonListItem(
                      title: Text("隐私",
                          style: TextStyle(
                              color: kColor33, fontSize: kFontSize32)),
                    ),
                    ATHCommonListItem(
                      title: Text("通用",
                          style: TextStyle(
                              color: kColor33, fontSize: kFontSize32)),
                      showDivider: false,
                    ),
                  ],
                ),
              ),
              Container(
                margin: EdgeInsets.only(top: kSize20),
                child: Column(
                  children: <Widget>[
                    ATHCommonListItem(
                      title: Text("帮助与反馈",
                          style: TextStyle(
                              color: kColor33, fontSize: kFontSize32)),
                    ),
                    ATHCommonListItem(
                      title: Text("关于 Moose",
                          style: TextStyle(
                              color: kColor33, fontSize: kFontSize32)),
                      showDivider: false,
                    ),
                  ],
                ),
              ),
              ATHSettingLogoutItem()
            ],
          ),
        ),
      ),
    );
  }
}

class ATHSettingLogoutItem extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      constraints: BoxConstraints(minHeight: kSize100),
      width: double.infinity,
      margin: EdgeInsets.only(top: kSize20),
      color: Colors.white,
      alignment: Alignment.center,
      child: GestureDetector(
        onTap: () {},
        child: Text(
          "退出登录",
          style: TextStyle(color: kColor33, fontSize: kFontSize32),
        ),
      ),
    );
  }
}
